import React, {Component, PropTypes} from 'react';
import {Link} from 'react-router';

class Counter extends Component {
    render() {
        const {increment, decrement, counter} = this.props;

        return (
            <p>
                Clicked: {counter} times
                {' '}
                <button onClick={increment}>Inc</button>
                {' '}
                <button onClick={decrement}>Dec</button>
                {' '}
                <Link to="/2">Link To 2</Link>
            </p>
        )
    }
}

Counter.propTypes = {
    increment: PropTypes.func.isRequired,
    decrement: PropTypes.func.isRequired,
    counter: PropTypes.number.isRequired
};

export default Counter;
